import {createRouter, createWebHashHistory} from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes: [
        {
            path: '/',
            redirect: '/introduce'
        },
        {
            path: '/introduce',
            name: 'introduce',
            component: () => import(/* webpackChunkName: "introduce" */ '../views/Introduce.vue')
        },
        {
            path: '/dashboard',
            name: 'dashboard',
            component: () => import(/* webpackChunkName: "dashboard" */ '../views/Index.vue')
        },
        {
            path: '/login',
            name: 'login',
            component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
        },
        {
            path: '/registered',
            name: 'registered',
            component: () => import(/* webpackChunkName: "login" */ '../views/Registered.vue')
        },
        {
            path: '/evaluationResults',
            name: 'evaluationResults',
            component: () => import(/* webpackChunkName: "login" */ '../views/evaluationResults.vue')
        },
        {
            path: '/hot',
            name: 'hot',
            component: () => import(/* webpackChunkName: "hot" */ '../views/IndexConfig.vue')
        },
        {
            path: '/new',
            name: 'new',
            component: () => import(/* webpackChunkName: "new" */ '../views/IndexConfig.vue')
        },
        {
            path: '/recommend',
            name: 'recommend',
            component: () => import(/* webpackChunkName: "recommend" */ '../views/IndexConfig.vue')
        },
        {
            path: '/menu',
            name: 'menu',
            component: () => import(/* webpackChunkName: "category" */ '../views/Menu.vue'),
        },
        {
            path: '/role',
            name: 'role',
            component: () => import(/* webpackChunkName: "new" */ '../views/Role.vue')
        },
        {
            path: '/course',
            name: 'course',
            component: () => import(/* webpackChunkName: "new" */ '../views/Course.vue')
        },
        {
            path: '/startPlan',
            name: 'startPlan',
            component: () => import(/* webpackChunkName: "new" */ '../views/StartPlan.vue')
        },
        {
            path: '/user',
            name: 'user',
            component: () => import(/* webpackChunkName: "guest" */ '../views/User.vue')
        },
        {
            path: '/topic',
            name: 'topic',
            component: () => import(/* webpackChunkName: "order" */ '../views/Topic.vue')
        },
        {
            path: '/plan',
            name: 'plan',
            component: () => import(/* webpackChunkName: "order" */ '../views/Plan.vue')
        },
        {
            path: "/plan/course",
            name: "planCourse",
            component: () => import("../views/PlanCourse.vue")
        },
        {
            path: "/plan/topic",
            name: "planTopic",
            component: () => import("../views/PlanTopic.vue")
        },
        {
            path: "/courseOrder",
            name: "courseOrder",
            component: () => import("../views/CourseOrder.vue")
        },
        {
            path: "/evaluationStatus",
            name: "evaluationStatus",
            component: () => import("../views/EvaluationStatus.vue")
        }
        ,
        {
            path: '/account',
            name: 'account',
            component: () => import(/* webpackChunkName: "account" */ '../views/Account.vue')
        }
    ]
})

export default router